<template>
    <!-- 页面容器 -->
    <view class="page-wraper">
        <!-- 页面头部 -->
        <view class="page-header" :class="backType == '0' ? 'page-header-2' : 'page-header-1'">
            <view class="address-list-top" v-if="backType == '0'" >
            	<uni-segmented-control :current="current" :values="segmentedItems" :style-type="styleType" :active-color="activeColor" @clickItem="onClickItem" />
            </view>
        </view>

        <!-- 页面主体 -->
        <view class="page-main">
            <scroll-view class="page-main-scroll" scroll-y="true" scroll-with-animation="true">
                <view class="page-main-list" v-for="(value,index) in list" :key="index">
					
					
					<uni-swipe-action-item>
						<view class="uni-list-cell" hover-class="uni-list-cell-hover" >
							<view class="uni-media-list"  @click="itemClick(value)">
								<image class="uni-media-list-logo" :src="addressType == 1 ? '/static/address/address_send.png' : '/static/address/address_shou.png'"></image>
							
								<view class="uni-media-list-body">
									<view class="uni-media-list-text-top">
										<text class="text">{{ value.name }}</text>
										<text class="text2">{{ check.isNull(value.mobile) ? '' : check.encryptMobile(value.mobile)}}</text>
									</view>
									<view class="uni-media-list-text-bottom">
										<text class="text">{{ check.isNull(value.whole_address) ? '' : value.whole_address}}</text>
									</view>
								</view>
							</view>
						</view>
						<template v-slot:right>
							<view class="slot-button" @click="bindClick(value)">
								<text class="slot-button-text">删除</text>
							</view>
						</template>
					</uni-swipe-action-item>
                </view>
				 
            </scroll-view>
        </view>

        <!-- 页面底部 -->
        <view class="page-footer">
            <view class="btn" @click="addAddressClick"><text>添加地址</text></view>
        </view>
		<loading-cover ref="loadingCover"></loading-cover>
    </view>
</template>
<script>
	
import address from '../public/js/address.js';
export default {
	mixins: [address],
	data() {
		return {};
	},
};
</script>

<style lang="scss">
@import '../public/css/address.scss';

</style>
